home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / gsdbloo.exe / GS_WINFC.PAS < prev    next >
Pascal/Delphi Source File  |  1992-02-24  |  4KB  |  127 lines

  1. Unit GS_Winfc;
  2. {-----------------------------------------------------------------------------
  3.                               Window PreProcessor
  4.  
  5.        GS_WINFC Copyright (c)  Richard F. Griffin
  6.  
  7.        07 July 1991
  8.  
  9.        102 Molded Stone Pl
  10.        Warner Robins, GA  31088
  11.  
  12.        -------------------------------------------------------------
  13.        This unit handles preprocessing of calls to a windows handler.
  14.        Ensures all references to windows routines are preprocessed.  This
  15.        will allow use of another windows handler instead of GS_Windw by
  16.        changing the procedure calls and uses statement in GS_Winfc.
  17.  
  18.                    SHAREWARE  -- COMMERCIAL USE RESTRICTED
  19.  
  20.    Changes:
  21.  
  22.  
  23. ------------------------------------------------------------------------------}
  24.  
  25. interface
  26. {$D-}
  27.  
  28. uses GS_Windw;
  29.  
  30. type
  31.  
  32.    GS_Wind_Objt   = Object
  33.                        Win_Obj : GS_Windw.GS_Wind_Objt;
  34.  
  35.                        x1,
  36.                        y1,
  37.                        x2,
  38.                        y2      :  integer;  {Window size}
  39.                        fg,                  {Foreground color}
  40.                        bg,                  {Background color}
  41.                        tx,                  {Text color}
  42.                        bgh,                 {Inverted background color}
  43.                        txh     :  byte;     {Inverted text color}
  44.  
  45.                        procedure InitWin (x1w,y1w,x2w,y2w : integer;
  46.                                           txw,bgw,fgw,txx,bgx : integer;
  47.                                           dbox : boolean;
  48.                                           bname : GS_Wind_Str80;
  49.                                           cpywin : boolean);
  50.                        procedure SetWin;
  51.                        procedure RelWin;
  52.                        procedure NamWin(bname:string);
  53.                     end;
  54.  
  55. Procedure GS_Wind_GetColors(var txw,bgw,fgw,txx,bgx : byte);
  56. Procedure GS_Wind_SetColors(txw,bgw,fgw,txx,bgx : byte);
  57. Procedure GS_Wind_SetNmMode;
  58. Procedure GS_Wind_SetFgMode;
  59. Procedure GS_Wind_SetIvMode;
  60. Procedure GS_Wind_GetWinSize(var wx1,wy1,wx2,wy2 : integer);
  61.  
  62. implementation
  63.  
  64. procedure GS_Wind_Objt.InitWin(x1w,y1w,x2w,y2w : integer;
  65.                                txw,bgw,fgw,txx,bgx : integer;
  66.                                dbox : boolean;
  67.                                bname : GS_Wind_Str80;
  68.                                cpywin : boolean);
  69. begin
  70.    x1 := x1w;
  71.    y1 := y1w;
  72.    x2 := x2w;
  73.    y2 := y2w;
  74.    fg := fgw;
  75.    bg := bgw;
  76.    tx := txw;
  77.    txh := txx;
  78.    bgh := bgx;
  79.    Win_Obj.InitWin(x1w,y1w,x2w,y2w,txw,bgw,fgw,txx,bgx,dbox,bname,cpywin);
  80. end;
  81.  
  82. procedure GS_Wind_Objt.SetWin;
  83. begin
  84.    Win_Obj.SetWin;
  85. end;
  86.  
  87. procedure GS_Wind_Objt.RelWin;
  88. begin
  89.    Win_Obj.RelWin;
  90. end;
  91.  
  92. procedure GS_Wind_Objt.NamWin(bname:string);
  93. begin
  94.    Win_Obj.boxname := bname;
  95. end;
  96.  
  97. Procedure GS_Wind_GetColors(var txw,bgw,fgw,txx,bgx : byte);
  98. begin
  99.    GS_Windw.GS_Wind_GetColors(txw,bgw,fgw,txx,bgx);
  100. end;
  101.  
  102. Procedure GS_Wind_SetColors(txw,bgw,fgw,txx,bgx : byte);
  103. begin
  104.    GS_Windw.GS_Wind_SetColors(txw,bgw,fgw,txx,bgx);
  105. end;
  106.  
  107. procedure GS_Wind_SetNmMode;
  108. begin
  109.    GS_Windw.GS_Wind_SetNmMode;
  110. end;
  111.  
  112. procedure GS_Wind_SetFgMode;
  113. begin
  114.    GS_Windw.GS_Wind_SetFgMode;
  115. end;
  116.  
  117. procedure GS_Wind_SetIvMode;
  118. begin
  119.    GS_Windw.GS_Wind_SetIvMode;
  120. end;
  121.  
  122. Procedure GS_Wind_GetWinSize(var wx1,wy1,wx2,wy2 : integer);
  123. begin
  124.    GS_Windw.GS_Wind_GetWinSize(wx1,wy1,wx2,wy2);
  125. end;
  126.  
  127. end.